<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
request.setAttribute("path", basePath);  
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人</title>

	

<link href="<%=path %>/web/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/web/assets/css/admin.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/web/assets/css/my.css" rel="stylesheet" type="text/css" />
<link href="<%=path %>/web/basic/css/demo.css" rel="stylesheet" type="text/css" />

<link href="<%=path %>/web/css/hmstyle.css" rel="stylesheet" type="text/css" />
<script src="<%=path %>/web/assets/js/jquery.min.js"></script>
<script src="<%=path %>/web/assets/js/amazeui.min.js"></script>
<%-- <script src="<%=path%>/web/js/myJQuery.js"></script>  --%>
<script type="text/javascript" src="<%=path%>/web/js/jquery-2.2.4.js"></script>
<script type="text/javascript">
function logOut(){
	//Ajax调用处理
	jQuery.ajax({
	    type: "POST",
	    url: "<%=path %>/user/logOut.do",
	    dataType:"json",
	    success: function(data){
	    	 alert("操作成功"); 
	    	  alert(data.SUCCESS);
	    	  window.history.go(-1);
	       },
	    error:function(){
		 alert("操作失败"); 
	   }
	 });
	 
	}

</script>
</head>

<body>

<div class="hmtop">
   <div class="am-container header">
			<ul class="message-l">
				<div class="topMessage">
					<div class="menu-hd">
					<c:choose> 
					<c:when test="${userInfoSession!=null}">
					  <a href="<%=path %>/web/user/login.jsp" target="_top" class="h">欢迎${userInfoSession.userName}</a> 
					  <EM  onclick="logOut()">退出</EM>
					</c:when>
					<c:otherwise>
						<a href="<%=path %>/web/user/login.jsp" target="_top" class="h">亲，请登录</a> 
						<a href="<%=path %>/web/user/signUp.jsp" target="_top">免费注册</a>
					</c:otherwise>
					</c:choose>
					</div>
				</div>
			</ul>
			<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd">
						<a href="<%=path %>/adv/queryAdvWeb.do" target="_top" class="h">商城首页</a>
					</div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng">
						<a href="<%=path %>/web/user/person.jsp" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a>
					</div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd">
						<a id="mc-menu-hd" href="<%=path %>/shopcar/queryShopcarInfo.do?userId=${userInfoSession.id}" target="_top"><i
							class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span></a>
					</div>
				</div>
				<div class="topMessage favorite">
					<div class="menu-hd">
						<a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a>
					</div>
			</ul>
		</div>
		<div class="nav white">
			<div class="logo">
				<img src="<%=path %>/web/images/logo.png" />
			</div>
			<div class="logoBig">
				<li><img src="<%=path %>/web/images/logobig.png" /></li>
			</div>

			<div class="search-bar pr">
				<a name="index_none_header_sysc" href="#"></a>
				<form action="<%=path%>/commodity/queryCommodityWeb.do"
					method="post">
					<input id="searchInput" name="name" type="text" placeholder="搜索"
						autocomplete="off"> <input id="ai-topsearch"
						class="submit am-btn" value="搜索" index="1" type="submit">
				</form>
			</div>
		</div>

		<div class="clear"></div>
</div>

</body>
</html>